import request from '../utils/request'

// -------------------------------------------------------------customer
export const fetchDatacustomer = query => {
  return request({
    url: '/awesomeProject1/apis/customer',
    method: 'get',
    params: query
  })
}

export const postDatacustomer = query => {
  return request({
    url: '/awesomeProject1/apis/customer',
    method: 'post',
    data: query
  })
}

export const putDatacustomer = query => {
  console.log(query)
  return request({
    url: '/awesomeProject1/apis/customer',
    method: 'put',
    data: query
  })
}
export const deleteDatacustomer = query => {
  console.log(query)
  return request({
    url: '/awesomeProject1/apis/customer',
    method: 'delete',
    params: query
  })
}
// -------------------------------------------------------------goodsView
export const fetchDatagoodsView = query => {
  return request({
    url: '/awesomeProject1/apis/goodsview',
    method: 'get',
    params: query
  })
}
// -------------------------------------------------------------goods
export const fetchDatagoods = query => {
  return request({
    url: '/awesomeProject1/apis/goods',
    method: 'get',
    params: query
  })
}

export const postDatagoods = query => {
  return request({
    url: '/awesomeProject1/apis/goods',
    method: 'post',
    data: query
  })
}

export const putDatagoods = query => {
  console.log(query)
  return request({
    url: '/awesomeProject1/apis/goods',
    method: 'put',
    data: query
  })
}
export const deleteDatagoods = query => {
  console.log(query)
  return request({
    url: '/awesomeProject1/apis/goods',
    method: 'delete',
    params: query
  })
}
// --------------------------------------------bill
export const fetchDatabill = query => {
  return request({
    url: '/awesomeProject1/apis/bill',
    method: 'get',
    params: query
  })
}

export const postDatabill = query => {
  return request({
    url: '/awesomeProject1/apis/bill',
    method: 'post',
    data: query
  })
}

export const putDatabill = query => {
  console.log(query)
  return request({
    url: '/awesomeProject1/apis/bill',
    method: 'put',
    data: query
  })
}
export const deleteDatabill = query => {
  console.log(query)
  return request({
    url: '/awesomeProject1/apis/bill',
    method: 'delete',
    params: query
  })
}
// --------------------------------printView
export const fetchDataprintView = query => {
  return request({
    url: '/awesomeProject1/apis/printView',
    method: 'get',
    params: query
  })
}
// -------------------------------orderView
export const fetchDataorderView = query => {
  return request({
    url: '/awesomeProject1/apis/orderView',
    method: 'get',
    params: query
  })
}
// // -----------------------------------orders
export const fetchDataorders = query => {
  return request({
    url: '/awesomeProject1/apis/orders',
    method: 'get',
    params: query
  })
}

export const postDataorders = query => {
  return request({
    url: '/awesomeProject1/apis/orders',
    method: 'post',
    data: query
  })
}

export const putDataorders = query => {
  console.log(query)
  return request({
    url: '/awesomeProject1/apis/orders',
    method: 'put',
    data: query
  })
}
export const deleteDataorders = query => {
  console.log(query)
  return request({
    url: '/awesomeProject1/apis/orders',
    method: 'delete',
    params: query
  })
}
//= ------------------------------------overtime
// export const fetchDataovertime = query => {
//   return request({
//     url: '/salary/apis/overtime',
//     method: 'get',
//     params: query
//   })
// }
//
// export const postDataovertime = query => {
//   return request({
//     url: '/salary/apis/overtime',
//     method: 'post',
//     data: query
//   })
// }
//
// export const putDataovertime = query => {
//   console.log(query)
//   return request({
//     url: '/salary/apis/overtime',
//     method: 'put',
//     data: query
//   })
// }
// export const deleteDataovertime = query => {
//   console.log(query)
//   return request({
//     url: '/salary/apis/overtime',
//     method: 'delete',
//     params: query
//   })
// }
